# Contributor:
# Maintainer: Julien Voisin <julien.voisin@dustri.org>
pkgname=hardened-malloc
pkgver=12
pkgrel=1
pkgdesc="Hardened allocator designed for modern systems."
url="https://github.com/GrapheneOS/hardened_malloc"
arch="x86_64 aarch64"
license="MIT"
checkdepends="python3"
source="$pkgname-$pkgver.tar.gz::https://github.com/GrapheneOS/hardened_malloc/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/${pkgname/-/_}-$pkgver"

build() {
	make VARIANT=light
	make VARIANT=default

}

check() {
	make test
}

package() {
	mkdir -p "$pkgdir"/usr/lib/
	install -m755 out/libhardened_malloc.so "$pkgdir"/usr/lib/
	install -m755 out-light/libhardened_malloc-light.so "$pkgdir"/usr/lib/

}

sha512sums="
d06c23c816058d02aec85d0e5e6fc1fe4ee23ab1406672793e2776c0dc706138c497709d636b10ba5758b69a26db438fd70d6fa302c4b2b9b237df9f202e867c  hardened-malloc-12.tar.gz
"
